<%--井杰--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title>21天计划养成项目登录页面</title>
    <link rel="stylesheet" type="text/css" href="css/new_file.css" />
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
</head>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/axios.min.js"></script>
<script type="text/javascript" src="js/vue.js"></script>

<body>

<div class="header">
    <img class="image1" src="img/21天习惯养成logo.png">
</div>

<div class="div1">
    <div id="app" class="container">
        <div class="row">
            <div class="col-md-4 text-center">
                <p> 播种一个行动， </p>
                <p> 你会收获一个习惯； </p>
                <p> 播种一个习惯， </p>
                <p> 你会收获一个个性； </p>
                <p> 播种一个个性， </p>
                <p> 你会收获一个命运。 </p>
                <p> -- 普德曼 </p>
            </div>

            <div class="col-md-4">
                <img class="image2" src="img/7c.jpg">
            </div>

            <div class="col-md-4 text-center">
                <div class="div2">
                    <div class="text-center" class="div3">
                        <label class="label1">21天习惯养成用户登录</label>
                    </div>
                    <div class="text-left" style="margin: 30px;">
                        <form action="" method="post">

                            <div>
                                <input type="text" class="form-control" placeholder="支持手机号登录"
                                       v-model="phone" v-on:click="back()" />
                            </div>

                            <div class="div4">
                                <input type="password" class="form-control" placeholder="请输入密码"
                                       v-model="passwd" v-on:click="back()" />
                            </div>
                            <div class="div5">
									<span style="color: red;">
										{{msg}}
									</span>
                            </div>
                            <div class="div6">
									<span>
										<button type="button" class="btn btn-success" v-on:click="login()">登录</button>
									</span>

                                <span class="div7">
										<button type="button" class="btn btn-success">
                                            <a href="register.html">注册</a>
                                        </button>
									</span>
                            </div>
                        </form>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>
<div class="footer">
    <div class="text-center" style="padding-top:12px ;">
        关于项目 | 服务条款 | 隐私政策 | 客服中心 | 联系我们 | 帮助中心
    </div>
</div>
</body>
<script>
    //创建vue对象
    var vue = new Vue({
        el: '#app',
        data: {
            msg: '',
            phone: '',
            passwd: ''
        },
        methods: {
            login: function () {
                if (this.phone == ''&&this.passwd=='') {
                    this.msg = '请输入您的账号';
                }else if(this.passwd == '') {
                    this.msg = '密码不能为空';
                }else if(this.phone==''){
                    this.msg='手机号码不能为空';
                }
            },
            back: function () {
                this.msg="";
            }
        },
        mounted: function () {

        }
    });
</script>

</html>
